package create.builder;

/**
 * @author lzp
 * @Date:2023/2/24
 * @description: 建造者模式测试类
 */
public class BuilderDemo {

	public static void main(String[] args) {
		// 创建指挥者
		Director director = new Director();

		// 创建具体的构造者
		SuperRoleBuilder superRoleBuilder = new SuperRoleBuilder();

		// 按流程顺序调用具体构造者的方法，组装生成对象
		director.construct(superRoleBuilder);

		Role role = superRoleBuilder.getResult();
		System.out.println(role);

	}

}
